package sk.vasicek.drinkmanager.service;

import java.util.ArrayList;

import sk.vasicek.drinkmanager.domain.Drink;
import sk.vasicek.drinkmanager.domain.Drinker;
import android.util.Log;

public class DrinkStatService {


	private float calculateAlcoholConcentraton(ArrayList<Drink> drinks, float weight, Drinker drinker) {
		float alcoholConcentration;
		float avgDrinkConcentration = 0;
		final float ethanolConcentration = new Float("0.8");

		for (Drink drink : drinks) {
			avgDrinkConcentration += (drink.getVolume() * drink.getAlcoholConcentration() * ethanolConcentration);
		}
		alcoholConcentration = ((avgDrinkConcentration / (weight * drinker.getSex().getAlcoholMassConstant())));
		Log.v(this.getClass().getSimpleName(), "concentration=" + alcoholConcentration);
		return alcoholConcentration;
	}
}
